<template>
  <div class="icon" :style="{ padding: padStyle }">
    <el-icon :size="size"><slot></slot></el-icon>
  </div>
</template>

<script lang="ts" setup>
defineProps({
  size: {
    type: Number,
    default: 20
  },
  padStyle: {
    type: String,
    default: '7px 14px'
  }
})
</script>

<style lang="less" scoped>
.icon {
  box-sizing: border-box;
  display: flex;
  place-items: center;
  cursor: pointer;
  &:hover {
    background: rgba(255, 255, 255, 0.3);
  }
}
</style>
